﻿namespace Morus.Infrastructure
{
    using System;
    using System.Linq.Expressions;

    public sealed class AndSpecification<T> : CompositeSpecification<T>
       where T : class
    {
        public AndSpecification(ISpecification<T> left, ISpecification<T> right)
            : base(left, right)
        {
        }

        public override Expression<Func<T, bool>> Expression
        {
            get
            {
                return Left.Expression.And(Right.Expression);
            }
        }
    }
}
